package demo3;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: XMQ
 * Date: 2022-05-16
 * Time: 19:44
 */
interface Shape{
//    public int a = 10;
//    public static int b = 20;
//    public static final int c = 30;

    void draw();

//    int COUNT = 10;
//    default void func(){
//        System.out.println(1);
//    }
//    static void func2(){
//        System.out.println(2);
//    }
//    public abstract void draw();
}
abstract class A implements Shape{
    public abstract void func2();
}
class B extends A {

    @Override
    public void draw() {

    }

    @Override
    public void func2() {

    }
}
class Rect implements Shape{

    @Override
    public void draw() {
        System.out.println("画一个矩形");
    }
}
class Flower implements Shape{

    @Override
    public void draw() {
        System.out.println("画一朵花");
    }
}
public class Test {
    public static void drawMap(Shape shape){
        shape.draw();
    }
    public static void main(String[] args) {
        drawMap(new Flower());
        drawMap(new Rect());
//        Shape shape = new Flower();
    }
}
